package com.maomao.template.service;

import com.maomao.template.bean.Member;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;

/**
 * Created by admin on 2018/4/23.
 */
public interface MemberService {
    @Cacheable(value="members", key="'user_'+#id")
    Member getMember(String id);

    @CacheEvict(value="members", key="'user_'+#id",condition="#id!=1")
    void deleteMember(String id);
}
